// 统一管理用户模块的接口
import request from '@/utils/request'
import { loginForm, loginResponseData, userResponseData } from './type'
enum API {
    LOGIN_URL = '/user/login',
    USERINFO_URL = '/user/info',
}

// 暴露接口函数

// 登录
export const login = (data: loginForm) =>
    request.post<unknown, loginResponseData>(API.LOGIN_URL, data)

// 获取用户信息接口方法
export const getUserInfo = () =>
    request.get<unknown, userResponseData>(API.USERINFO_URL)
